<template>
	<view class="mt32 df aic jcsb">
		<view :class="navindex === 0 ? 'on tags_1' : 'tags_1'" @click.stop="toExhibitions()">EXHIBITORS</view>
		<view :class="navindex === 1 ? 'on tags_1' : 'tags_1'" @click.stop="toProducts()">PRODUCTS</view>
		<view :class="navindex === 2 ? 'on tags_1' : 'tags_1'" @click.stop="toMyList()">MY LIST</view>
	</view>
</template>

<script>
	export default {
		name: "publicNav",
		props: {
			navindex: {
				type: Number,
				default: 0
			},
		},

		data() {
			return {};
		},

		methods: {
			toExhibitions() {
				uni.navigateTo({
					url: '/pages/exhibitors/lists'
				})
			},

			toProducts() {
				console.log('点了没效果？')
				uni.navigateTo({
					url: '/pages/products/products'
				})
			},

			toMyList() {
				uni.navigateTo({
					url: '/pages/my_list/exhibitors_list'
				})
			}
		}
	}
</script>

<style scoped>
	.tags_1 {
		position: relative;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 210rpx;
		height: 76rpx;
		font-size: 28rpx;
		line-height: 36rpx;
		font-weight: bold;
		border-radius: 8rpx;
		border: 2rpx solid #CCCCCC;
	}

	.on.tags_1 {
		color: #fff;
		background: #A90000;
		border-color: #A90000;
	}
</style>